import request from '@/utils/request'
const apiUrl = '/api/performance'
// 获取绩效薪资列表
export function getPerformanceList(params) {
    return request({
        url: `${apiUrl}/list`,
        method: 'get',
        params
    })
}

// 获取绩效薪资详情
export function getPerformanceDetail(id) {
    return request({
        url: `${apiUrl}/view/${id}`,
        method: 'get'
    })
}

// 创建绩效薪资记录
export function createPerformance(data) {
    return request({
        url: `${apiUrl}/save`,
        method: 'post',
        data
    })
}

// 更新绩效薪资记录
export function updatePerformance(id, data) {
    return request({
        url: `${apiUrl}/save`,
        method: 'post',
        data
    })
}

// 删除绩效薪资记录
export function deletePerformance(id) {
    return request({
        url: `${apiUrl}/delete/${id}`,
        method: 'delete'
    })
} 